home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Selection / Multimedia Selection Volume One - CD-ROM / MULTIMEDIA SELECTION____________.ISO / utils / guardset / manual.com (.txt) < prev    next >
Encoding:
DOC2COM (Gerald DePyper)  |  1993-03-20  |  61.4 KB  |  1,404 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.               REFERENCE MANUAL FOR GUARDSET
  9.  
  10.  
  11.                 Table of contents
  12.  
  13.  
  14.  
  15.  
  16.  
  17.         1.0  Introduction..................................p. 1
  18.           1.1  Requirements................................p. 2
  19.           1.2  Limits......................................p. 2
  20.           1.3  Backup copies...............................p. 2
  21.           1.4  Copying, Moving, Renaming, Deleting SENTRY..p. 3
  22.           1.5  Different kinds (levels) of security........p. 3
  23.           1.6  Additional security features................p. 4
  24.  
  25.         2.0  Using GUARDSET to create SENTRY...............p. 4
  26.           2.1  The GUARDSET Screen.........................p. 5
  27.           2.2  Security levels.............................p. 6
  28.         2.21  Security level setting tables............p. 6
  29.           2.211  Security level settings if the item
  30.                 is a directory.....................p. 7
  31.           2.212  Security level settings if the item
  32.                 is a file or group of files........p. 7
  33.           2.213  Security level settings if the item
  34.                 is the root directory..............p. 8
  35.           2.3  Password selection and other options........p. 8
  36.           2.4  GUARDSET screen messages....................p. 9
  37.           2.5  Four examples...............................p. 16
  38.     
  39.         3.0  Running SENTRY................................p. 20
  40.           3.1  Entering and changing the password..........p. 20
  41.         3.11  Gotcha!..................................p. 20
  42.           3.2  Using batch files...........................p. 21
  43.           3.3  Trouble-shooting SENTRY.....................p. 22
  44.  
  45.         Appendix A: File attributes and their hex values...p. 24
  46.     
  47.         Appendix B: Design history and background..........p. 25
  48.     
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.         GUARDSET / SENTRY copyright 1993 by Jerry DePyper
  58.     Use of this program without the author's permission is prohibited.
  59.  
  60.                     - 1 -
  61.  
  62.     1.0  Introduction
  63.  
  64.     GUARDSET is not itself a data security program; it is a tool that
  65.     will allow you to easily create encryption/decryption programs to
  66.     control access to various areas of your computer's disk, and thus
  67.     to build your own tailor-made security system. If you have not
  68.     already done so, take a look at GSDEMO.COM as distributed with
  69.     GUARDSET to get a good overview of how to use GUARDSET to create
  70.     a logon/logoff security system for your PC.
  71.     
  72.     Logon/logoff security means this: that in order to access a
  73.     secured area of your disk, a logon procedure is used, in which
  74.     a password will be required. This engages a decryption process
  75.     and makes the sensitive area accessible. Upon termination of this
  76.     access, a logoff procedure is manually or automatically invoked,
  77.     which encrypts the area so that unauthorized people are locked
  78.     out. When you first create a SENTRY module, you will run it once
  79.     in encrypt mode to make all sensitive areas inaccessible. From
  80.     then on the usual procedure will look like this:
  81.  
  82.         1. Logon (Run SENTRY to decrypt)
  83.         2. Access (Use your programs as you always have)
  84.         3. Logoff (Encrypt)
  85.     
  86.     Throughout this manual the name 'SENTRY.COM' (or simply 'SENTRY')
  87.     will be used as the program name of the encryption/decryption
  88.     module created through GUARDSET. You may, of course, make several
  89.     modules and give them any valid file name you choose. (The exten-
  90.     sion must always be .COM). This manual is your guide to creating
  91.     and using the SENTRY module.
  92.  
  93.     In any given SENTRY module, you may name up to 11 different items,
  94.     each of which may be a specific file or group of files, an entire
  95.     directory, or a whole tree structure of directories and sub-
  96.     directories. Protection is achieved by hiding the items, by
  97.     encrypting their names, by encrypting the data itself within each
  98.     file, or any combination of the above. To specify just what kind
  99.     of protection you want, you can set each of several switches as
  100.     you see fit, or you may elect to simply designate a security level
  101.     and let GUARDSET set all the switches for you. You may create as
  102.     many SENTRY modules as you want, each with its own password and
  103.     its own set of data areas to protect, which may overlap areas
  104.     protected by other SENTRYs.
  105.  
  106.     Although in most cases you will create the SENTRY program on your
  107.     hard disk, I suggest that you always run GUARDSET itself from the
  108.     floppy drive. Make one backup copy diskette and keep both floppies
  109.     in separate secure places. Since GUARDSET is your 'master key' to
  110.     the security system, you don't want copies of it lying around!
  111.         
  112.     Do this:
  113.         l. Decide which directories or files to protect.
  114.         2. Decide on security levels.
  115.         3. Use GUARDSET to create the SENTRY program(s).
  116.         4. Create a batch file (or two) to automate things, or
  117.            include SENTRY in batch file(s) you already use.
  118.         5. Run the batch files as your logon/logoff procedure.
  119.                     - 2 -
  120.  
  121.     1.1  Requirements
  122.  
  123.     Hardware: IBM or compatible PC, XT, AT, etc. *
  124.           88K RAM to run GUARDSET
  125.           5K - 10K to run SENTRY
  126.           Adequate disk space for each SENTRY and each batch file
  127.           Free disk space equal to the largest file in which data
  128.             will be encrypted.
  129.  
  130.     Operating System: MS-DOS or PC-DOS 3.0 or higher *
  131.     
  132.     You: A fundamental working acquaintance with MS-DOS / PC-DOS
  133.         (no programming or 'techy' knowledge required)
  134.  
  135.     * NOTE: IF YOU ARE UNSURE WHETHER THIS DESCRIBES YOUR SYSTEM, OR
  136.         IF YOU ARE USING A NON-DOS UTILITY OR DISK-CACHE PROGRAM
  137.         FOR DISK MANAGEMENT, PLEASE EXPERIMENT WITH A SMALL TEST
  138.         DIRECTORY OR FILE BEFORE BEGINNING IN EARNEST (See section
  139.         3.3, problem #5)
  140.  
  141.  
  142.  
  143.     1.2  Limits
  144.  
  145.     A maximum of 11 items can be handled by any one SENTRY program.
  146.     Each item can be a directory, file, or group of files. If it is a
  147.     directory, all files within the directory may be included, and
  148.     processing may continue into sub-directories.
  149.  
  150.     If sub-directory processing is chosen for any item, all subdirecto-
  151.     ries within the named directory will be included in all processing,
  152.     with no limit on the number of sub-directories. Moreover, any sub-
  153.     directories within these sub-directories will be included as well.
  154.     The limit is this: SENTRY will only continue to do this for up to
  155.     9 levels of sub-directories within sub-directories.
  156.     
  157.     You may create an unlimited number of SENTRY programs. The support
  158.     mechanism can theoretically keep track of over 20,000 separate
  159.     SENTRYs, but is in practice limited to about 300 to 2,000 SENTRYs
  160.     or so, depending upon the capacity of the GUARDSET diskette.
  161.  
  162.  
  163.  
  164.     1.3  Backup copies
  165.     
  166.     As noted in 1.0 above, I strongly recommend that you not install
  167.     GUARDSET on your hard disk. You should, of course, make a backup
  168.     copy of the GUARDSET diskette and keep both diskettes in separate
  169.     safe places. In addition note this: GUARDSET keeps the current
  170.     specifications (in cryptic form, of course) of your security
  171.     system on one or more support files on the GUARDSET diskette.
  172.     These files, named GSSUPT.001, GSSUPT.002, etc, should be trans-
  173.     ferred to your backup diskette whenever you use GUARDSET to modify
  174.     or add SENTRY modules.
  175.  
  176.     Making backup copies of each SENTRY is a good idea, too, but note
  177.     1.4 below.
  178.                     - 3 -
  179.     
  180.     1.4  Copying, Moving, Renaming, or Deleting SENTRY
  181.     
  182.     Except for backup purposes, do not use DOS or any other file
  183.     utility to copy, move, or rename a SENTRY module. The path and
  184.     file name that you assign to each SENTRY program when you create
  185.     it through GUARDSET is the name by which it knows itself; attempts
  186.     to run it by another name will fail. This is a design feature to
  187.     prevent the deliberate or inadvertant misuse of SENTRY.
  188.     
  189.     If you want to make a copy of a particular SENTRY, bring it up
  190.     in GUARDSET. Then assign a new name and save it. If you then want
  191.     to delete the original SENTRY, do that through GUARDSET also.
  192.     This wipes the program from the disk completely so that no
  193.     un-erase utility may be used to recover it. The support file
  194.     provides a limited mechanism for rebuilding any deleted SENTRY:
  195.     the deleted SENTRY's specifications are retained until they are
  196.     replaced by specs for a new SENTRY. So you can still bring the
  197.     deleted SENTRY up from GUARDSET's menu, and rebuild it.
  198.  
  199.     The point is this: only you who control the GUARDSET diskette
  200.     may modify SENTRY programs.
  201.     
  202.     
  203.  
  204.     1.5  Different kinds (levels) of security
  205.  
  206.     Your SENTRY module can protect data in several ways and in varying
  207.     degrees of security, as follows:
  208.  
  209.        1) Encrypt and hide any directory name on any valid disk
  210.           drive. (switch 'D')
  211.        2) Set any file attribute. (Hidden, read-only, etc.  - 
  212.           switch 'A') See appendix A.
  213.        3) Encrypt any file name. (switch 'F')
  214.        4) Encrypt any file's data. (switch 'F')
  215.  
  216.      NOTE:    There are several things to note about data encryption, as
  217.         opposed to the other three options:
  218.  
  219.         1) Data encryption always involves encryption of the file
  220.            name as well.
  221.         2) There is significantly more disk I-O, and thus more
  222.            processing time, involved in data encryption than in
  223.            any of the other options.
  224.         3) SENTRY requires enough free disk space for a temporary
  225.            file the same size as the largest file to be encrypted.
  226.            Keep this in mind especially for floppy diskettes.
  227.         4) Data encryption/decryption results in the file's data
  228.            being relocated to a different physical disk location
  229.            with every encryption/decryption cycle. Some software
  230.            products use a copy protection scheme that will be
  231.            disturbed by this action. Likewise, DOS boot files
  232.            will not function correctly if moved to another disk
  233.            location. (See error message E77 in section 2.4 below)
  234.  
  235.     Each item on the GUARDSET screen may be given its own independent
  236.     level of security.
  237.                     - 4 -
  238.  
  239.     1.6  Additional security features
  240.     
  241.     Your copy of GUARDSET cannot be used to alter SENTRY programs
  242.     created by another registered GUARDSET. It will recognize only
  243.     its own 'children' SENTRYs. (Your registered version will also
  244.     recognize and convert, on a one-time basis, any SENTRY programs
  245.     you may have created with the standard non-customized version.)
  246.     In like manner, your SENTRY programs cannot be used to decrypt
  247.     any directories or files encrypted by another registered SENTRY.
  248.     
  249.     GUARDSET is self-diagnostic. Any attempt to alter it will most
  250.     likely disable it completely.
  251.  
  252.     In addition to providing menu selection of previously defined
  253.     SENTRYs, and a measure of backup protection, GUARDSET's support
  254.     mechanism provides a means of insuring that every SENTRY you
  255.     create will be compatible with every other SENTRY in the system,
  256.     and thus avoid the conflict problem discussed in problem #1,
  257.     section 3.3 below.
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.     2.0  Using GUARDSET to create SENTRY
  265.  
  266.     With the GUARDSET diskette in drive A: (or B: etc.), type
  267.  
  268.                 A:GUARDSET
  269.  
  270.     After a brief self-diagnosis, one of two things will happen:
  271.  
  272.     If you are starting GUARDSET for the first time, the main GUARDSET
  273.     screen will appear, with the default name 'C:\SENTRY.COM' supplied
  274.     as the possible name of your first encryption/decryption program.
  275.  
  276.     If you have created one or more SENTRY programs, you will see a
  277.     menu of all such programs. You may select one of these from the
  278.     menu to alter, delete, or to use as a model for creating a new
  279.     SENTRY, or hit F2 to start a new one from scratch. (If you know
  280.     just what program you want to modify, you may select it directly
  281.     as you invoke GUARDSET, for example:
  282.  
  283.                 A:GUARDSET C:\SECURE\SENTRY.COM
  284.  
  285.     which is the same as selecting it from the menu.)
  286.  
  287.  
  288.     When you get the main GUARDSET screen, you simply key in the
  289.     security specifications as follows:
  290.  
  291.                     - 5 -
  292.  
  293.     2.1  The GUARDSET Screen
  294.  
  295.     ABOVE THE BOX you give your SENTRY program a name and a path by
  296.     which DOS is to know it, and by which it knows itself.
  297.     
  298.     INSIDE THE BOX you specify which files and/or directories it is to
  299.     protect, up to 11 distinct items. Each item is a directory, a file
  300.     or group of files (you can use '*' and '?' wildcards to name them),
  301.     or the root directory. I call your attention to the two global
  302.     switches and the switches to the far right of each named item:
  303.     
  304.         '?'    may be 'D', 'F', or 'R' to indicate whether the
  305.             named item is a Directory, a File or group of
  306.             files, or the Root directory. (See sect. 2.4,
  307.             messages I07 and I11 below.)
  308.             
  309.         '!'    may be '0' thru '9' or 'A' thru 'D' to indicate the
  310.             security level. The higher the number, the heavier
  311.             the security, with 'A' thru 'D' indicating data
  312.             encryption.  (See sections 2.2, 2.21, 2,211, 2.212,
  313.             and 2.213, and section 2.4, messages I08 and I12.)
  314.         
  315.         The '!' switch sets the following switches for you, so you
  316.         may never have to set them directly:
  317.         
  318.         'D'    may be 'X' or ' ' to indicate whether or not to
  319.             encrypt the Directory name. (Section 2.4, msg.I13.)
  320.  
  321.         'S'    may be 'X' or ' ' to indicate whether or not to
  322.             continue processing into Sub-directory levels.
  323.             (Message I14.)
  324.  
  325.         'F'    may be 'N', 'D', or ' ' to indicate whether or not
  326.             to encrypt the File Name(s) or Data. (Message I15.)
  327.  
  328.         'A'    may be 'A', 'B', 'C', 'D', or ' ' to indicate
  329.             whether or not to change the file Attribute
  330.             according to one of four plans. (Message I16.)
  331.  
  332.         'xx'    is used only in if plan 'D' was chosen (Msg. I17.)
  333.  
  334.  
  335.     BELOW THE BOX you set the password and other features of SENTRY
  336.     according to your needs. (See section 2.4, messages I19 thru I28.)
  337.  
  338.  
  339.     When everything is as you want it, hit the F7 key to create SENTRY
  340.     and put it where you have specified. You can hit the ESC key at any
  341.     point to quit GUARDSET and return to DOS.
  342.  
  343.                     - 6 -
  344.  
  345.     2.2  Security levels
  346.  
  347.     There are three ways to set security levels:
  348.  
  349.         1) You can set the global security level switch '!' at the
  350.         top of the GUARDSET screen. All new file or directory names
  351.         added to the list will then be given this security level.
  352.         (See section 2.4, message I08.)
  353.  
  354.         2) You can override this global value on any line by
  355.         entering a different value in the '!' switch to the right
  356.         of the path name. (See section 2.4, message I12.)
  357.  
  358.         3) You can individually set each of the switches further to
  359.         the right. (See section 2.4, messages I13 thru I17.)
  360.  
  361.  
  362.     Suggestion: For modest data protection, name the directory that
  363.     contains the sensitive files, and select security level 0. For more
  364.     comprehensive protection, choose security level 4 or 9. To really
  365.     safeguard a file by encrypting its data, enter the directory that
  366.     contains it as one item, using security level 0, then enter the
  367.     file as a separate item with security level A. (Remember also to
  368.     enter 'F' under the '?' switch.)  For examples, see section 2.5.
  369.     
  370.     
  371.  
  372.  
  373.     2.21 Security level setting tables
  374.  
  375.     Both the global '!' switch and each item's '!' switch is a one-
  376.     character code fom '0' thru '9' or 'A' thru 'D', representing a
  377.     level of security. The higher the number, the heavier the level of
  378.     security, with 'A' thru 'D' including data encryption. Please
  379.     observe from the following 3 tables that the same code can mean
  380.     slightly different things, depending upon whether the item involved
  381.     is a directory, a file or group of files, or the root directory of
  382.     a drive. The most popular and useful settings are marked with '*'.
  383.  
  384.                     - 7 -
  385.  
  386.     2.211 Security level settings if the item is a directory:
  387.  
  388.     Sec'y Switches
  389.     Level  DSFA    Description
  390.  
  391.     * 0    X    Directory name is encrypted and hidden (Default)
  392.       1       A    All file attributes in the directory set per plan A
  393.       2    X  A    Directory name is encrypted and file attributes set
  394.     * 3      NA    All file names are encrypted and attributes set
  395.     * 4    X NA    Directory and file names encrypted; attributes set
  396.       5    XX    Directory and all sub-directory names encrypted
  397.       6     X A    File attributes set, including those in sub-dirs
  398.       7    XX A    Directory name encrypted and file attributes set,
  399.              including sub-directories
  400.       8     XNA    File names encrypted and attributes set, including
  401.              those in sub-directories
  402.     * 9    XXNA    Directory, sub-dir'y and all file names encrypted
  403.              and attributes set within all sub-directories
  404.       A      DA    All file names and data encrypted; attributes set
  405.       B    X DA    Directory and all file names and data encrypted and
  406.              attributes set
  407.       C     XDA    All file names and data encrypted and attributes
  408.              set within all sub-directories
  409.       D    XXDA    Directory, sub-directory and all file names and
  410.              data encrypted; attributes set within all sub-dirs
  411.  
  412.  
  413.  
  414.     2.212 Security level settings if the item is a file or group of
  415.     files:
  416.  
  417.     Sec'y Switches
  418.     Level  DSFA    Description
  419.  
  420.       0         Meaningless setting - not used
  421.       1       A    File attributes are set per plan A
  422.       2       A    Same as #1
  423.     * 3      NA    File names are encrypted and attributes set
  424.       4      NA    Same as #3
  425.       5      NA    Same as #3
  426.       6      NA    Same as #3
  427.       7      NA    Same as #3
  428.       8      NA    Same as #3
  429.       9      NA    Same as #3
  430.     * A      DA    File names and data encrypted and attributes set
  431.       B      DA    Same as #A
  432.       C      DA    Same as #A
  433.       D      DA    Same as #A
  434.                     - 8 -
  435.  
  436.     2.213 Security level settings if the item is the root directory:
  437.  
  438.     Sec'y Switches
  439.     Level  DSFA    Description
  440.  
  441.       0         Meaningless setting - not used
  442.       1       A    All file attributes in the root directory set per
  443.              plan A
  444.       2       A    Same as #1
  445.       3      NA    All file names in root directory are encrypted and
  446.              attributes set
  447.       4      NA    Same as #3
  448.     * 5    XX    All sub-directory names encrypted
  449.       6     X A    File attributes set, including those in sub-dirs
  450.       7    XX A    Sub-directory names encrypted; file attributes set
  451.       8     XNA    File names encrypted and attributes set, including
  452.              those in sub-directories
  453.       9    XXNA    All sub-directory names encrypted; All file names
  454.              encrypted and attributes set within all sub-dirs
  455.       A      DA    File names and data encrypted and attributes set in
  456.              root directory
  457.       B      DA    Same as #A
  458.       C     XDA    File names and data encrypted and attributes set,
  459.              including those in sub-directories
  460.       D    XXDA    Sub-directories, file names and data encrypted, 
  461.              and attributes set within all sub-directories.
  462.  
  463.  
  464.  
  465.  
  466.     2.3  Password selection and other options
  467.  
  468.     Now that you have specified the files and/or directories to protect
  469.     and the security levels to use, you may want to specify a couple
  470.     other options, so that the SENTRY module is just what you want.
  471.  
  472.     First among these is to give the module a password of your own
  473.     invention instead of the pathetically unimaginative default one,
  474.     'PASSWORD'. This can be from 1 to 8 characters, including numbers
  475.     and special characters. (For a discussion on changing this password
  476.     on the fly within SENTRY, see section 3.1 below).
  477.  
  478.     Other SENTRY characteristics can likewise be set from the GUARDSET
  479.     screen. Refer to messages I19 thru I28 below.
  480.  
  481.                     - 9 -
  482.  
  483.     2.4  GUARDSET screen messages
  484.  
  485.          As you cursor around on the GUARDSET screen, you will always be
  486.     presented with a message on the 3rd line of the screen. The
  487.     messages beginning with an 'I' are informational messages related
  488.     to your current cursor position on the screen; they tell you what
  489.     the program expects from you at that point. The 'W' warning
  490.     messages and 'E' error messages only appear when you have hit F7 to
  491.     create SENTRY, and something is not right. Other 'grunts' of the
  492.     speaker that are not accompanied by a message simply mean that the
  493.     key you hit has no meaning or is invalid in the current situation.
  494.  
  495.     Following are explanations of each GUARDSET screen message:
  496.  
  497.  
  498.     I05:    Enter the drive letter where you want GUARDSET to store the
  499.          SENTRY program. See next note on naming the SENTRY program.
  500.  
  501.     I06:    Enter the full path name of the program. The initial path
  502.         name 'C:\SENTRY.COM' is only a suggestion. Any valid DOS
  503.         file name with the .COM extension is OK. Likewise, you may
  504.         put this program on any subdirectory or any disk drive of
  505.         your choice.
  506.             NOTE: Do not use the DOS COPY or REName commands or
  507.             any other utility to change the path name that you
  508.             give here. See note in section 1.4.
  509.  
  510.     I07:    Enter a 'D' if the items to be protected are directories
  511.         Enter an 'F' if they are files
  512.         The character you type in here will automatically be used
  513.         to set the item type switch (under the '?') for each new
  514.         line you enter below. See also message I11 below.
  515.  
  516.     I08:    Enter '0' thru '9' or 'A' thru 'D' for default security
  517.         level. See tables above. The character you type in here
  518.         will automatically be used to set the security level switch
  519.         (under the '!') for each new line you enter below. See also
  520.         messages I12 thru I17 below.
  521.  
  522.     I09:    Enter the drive letter where this item (file or directory)
  523.          is located. (This will usually be 'C')
  524.  
  525.     I10:    Enter the full path name of the directory or file(s) to be
  526.          protected. To designate a group of files, the wildcard
  527.         characters '*' and '?' may be used as with any DOS command.
  528.  
  529.     I11:    If the name just entered was a directory, enter a 'D' here.
  530.         If it was a file or group of files, enter 'F'. If it was
  531.         the root directory (only the drive letter with no path
  532.         name), enter 'R'.
  533.  
  534.     I12:    Enter '0' thru '9' or 'A' thru 'D' for security level, if
  535.         you want to override the default level chosen above (I08).
  536.         See also the tables above and messages I13 thru I17 below.
  537.  
  538.                     - 10 -
  539.  
  540.     You will rarely, if ever, have occasion to set the individual
  541.     switches under the columns labelled 'DSFAxx'. Message I13 through
  542.     I17 refer to these switches:
  543.  
  544.     I13:    The item named is a directory. Enter 'X' here to encrypt
  545.         its name.
  546.  
  547.     I14:    The item named is a directory. Enter 'X' here to continue
  548.         processing into its sub-directories. If this option is
  549.         chosen, whatever action was requested for the named
  550.         directory will continue for each of its sub-directories,
  551.         each of their sub-directories, etc...as far as 9 levels
  552.         down through the directory tree structure.
  553.  
  554.     I15:    Enter 'N' here to encrypt file names, or 'D' to encrypt
  555.         file data. If the named item is a directory, all files
  556.         within that directory will be encrypted. If the item is a
  557.         file or group of files, only those named will be affected.
  558.         I recommend always coupling this option with file attribute
  559.         plan 'A' as described below, so that the encrypted file
  560.         names (especially in an unencrypted directory) will be
  561.         hidden, and not appear on a DIR command...but you may
  562.         choose differently - read on:
  563.  
  564.     I16:    Enter 'A', 'B', 'C', or 'D' here to choose one of the
  565.         following plans for setting file attributes. (Again, if the
  566.         named item is a directory, all files in that directory are
  567.         affected; if it is a file name or group of file names, only
  568.         those named are affected).
  569.  
  570.         Refer to Appendix A for notes on the various file attribute
  571.         combinations possible, and their corresponding hex values.
  572.  
  573.         If you find the following information on the four plan
  574.         types to be boring or obscure, just stick with plan 'A':
  575.  
  576.         Plan A: This is the suggested method of altering file
  577.             attributes. Most files on a typical PC disk or
  578.             diskette are of three types: Normal, in which no
  579.             attribute bits are set, Archived normal, in which
  580.             only the archive bit is set, and the DOS system
  581.             files, in which the archive, DOS file, hidden, and
  582.             read-only bits are all set. Plan 'A' sets these
  583.             three common attribute bit patterns to three very
  584.             uncommon bit patterns when SENTRY is run in
  585.             'encrypt' mode, which all have the effect of hiding
  586.             the file. The original bit patterns are then
  587.             restored when SENTRY is run again to decrypt. All
  588.             other bit patterns are left unchanged. The uncommon
  589.             bit patterns used are: DOS bit alone, DOS plus
  590.             hidden alone, and DOS plus read-only alone (Hex 04,
  591.             05, and 06, respectively). If you happen to use any
  592.             of these attribute bit combinations in any of your
  593.             files, please note this: Under plan 'A', if SENTRY
  594.             encounters a file with one these attribute bit
  595.             patterns during a 'decrypt' run, it will convert it
  596.             to one the common patterns mentioned above.
  597.                     - 11 -
  598.  
  599.         Plan B: This plan affects only the archive bit. Under it,
  600.             when SENTRY is run to encrypt, the archive bit is
  601.             set off for all files affected. When SENTRY is run
  602.             to decrypt, archive bits are set on for all files
  603.             affected (even for those whose archive bits were
  604.             originally off). If you use the DOS BACKUP and
  605.             RESTORE options or similar utilities that only back
  606.             up files whose archive bit is set, you may find
  607.             this plan useful, even without encrypting the file
  608.             name, if all you want is to keep certain 'nuisance'
  609.             files from being backed up.
  610.  
  611.         Plan C: Under this plan, when SENTRY is run to encrypt, all
  612.             files affected are assigned the same attribute
  613.             pattern: Archive off, DOS, hidden, read-only all on
  614.             (hex 07). When SENTRY is run again to decrypt, all
  615.             files affected are assigned a normal, archive-on
  616.             attribute (hex 20). This plan works fine for most
  617.             cases, too, but if you have any hidden or read-only
  618.             files that would be affected, they will be
  619.             converted to normal archived files after one cycle.
  620.  
  621.         Plan D: This is the same as plan 'C', except you assign
  622.             whatever bit pattern you want for all encrypted
  623.             files. (See next message for details on that.) Like
  624.             plan 'C', when SENTRY is run again to decrypt, all
  625.             files affected are assigned a normal, archive-on
  626.             attribute (hex 20).
  627.  
  628.     I17:    Unless you asked for plan 'D' above, you will never see
  629.         this message. Specify the hex value here (0 thru 7 or
  630.         20 thru 27) of the attribute bit pattern you want SENTRY to
  631.         assign to each encrypted file.
  632.         
  633.         Refer to Appendix A for notes on the various file attribute
  634.         combinations possible, and their corresponding hex values.
  635.  
  636.     I19:    Specify the hex value here (0 thru 3 or 20 thru 23) of the
  637.         attribute bit pattern you want to assign to SENTRY itself.
  638.         If SENTRY will be placed on your hard disk, you can specify
  639.         here that SENTRY be a hidden, read-only file (hex 03), or
  640.         whatever you choose. The default value is 0.
  641.         
  642.         Refer to Appendix A for notes on the various file attribute
  643.         combinations possible, and their corresponding hex values.
  644.  
  645.     I20:    This switch is normally set to 'Y' (Yes), which means that
  646.         whenever SENTRY is run to decrypt, it will display a
  647.         message telling the date and time of the most recent good
  648.         access. To suppress this screen message, enter 'N' here.
  649.         
  650.     I21:    This switch is normally set to 'Y' (Yes), which means that
  651.         whenever SENTRY is run, it will display simple progress
  652.         messages as it encrypts or decrypts each named path. To
  653.         suppress these screen messages, enter 'N' here.
  654.                     - 12 -
  655.  
  656.     I22:    This switch is normally set to 'Y' (Yes), which means that
  657.         whenever SENTRY is run to decrypt, it will demand that
  658.         the correct password first be keyed in. If you want
  659.         to skip the password logic, enter 'N' here. Notice that if
  660.         you do so, the following six messages are irrelevant:
  661.  
  662.     I23:    If you want a new password, key it in here, from 1 to 8
  663.         characters. Also see section 3.1 below for changing the
  664.         password on the fly through SENTRY itself.
  665.  
  666.     I24:    SENTRY normally allows 3 attempts at entering the password
  667.         before denying access. Change that value to any number
  668.         from 1 to 99, if you wish.
  669.  
  670.     I25:    This switch is normally set to 'N' (No), which means that
  671.         the keyboard buffer is not purged before the password is
  672.         accepted. (So you can type ahead, before you actually get
  673.         the password prompt). If you want to disallow typing ahead,
  674.         enter 'Y' here.
  675.  
  676.     I26:    This switch is normally set to 'Y' (Yes), which means that,
  677.         if the correct password has been entered, it can then be
  678.         changed on the fly through SENTRY itself. If you want to
  679.         disallow such password changes, enter 'N' here. (You will
  680.         still be able to change SENTRY's password via GUARDSET.)
  681.  
  682.     I27:    This switch is normally set to 'N' (No), which means that
  683.         if access is being denied because the correct password was
  684.         not entered, SENTRY will merely pass control back to DOS,
  685.         with the appropriate errorlevel code. If you want, SENTRY
  686.         can go into an infinite loop instead, which will lock up
  687.         the processor and force a re-boot. To choose this option,
  688.         enter 'Y' here.
  689.  
  690.     I28:    In the case of a failed access attempt, SENTRY records the
  691.         time, date, and passwords attempted. At the next good
  692.         access attempt, this information will be displayed on the
  693.         screen. Normally, this information is accompanied by an
  694.         alarm beep from the speaker to alert you to the fact that
  695.         an unauthorized access was attempted. To suppress this
  696.         alarm, enter 'N' here (Screen message will still appear).
  697.  
  698.     I30:    If you are creating a SENTRY program on a floppy diskette
  699.     I31:    drive, or are specifying items to protect on a diskette
  700.         drive, GUARDSET may need to prompt you with these messages
  701.         as to when to change diskettes.
  702.  
  703.                     - 13 -
  704.  
  705.     W40:    If you brought up an existing SENTRY program (see section
  706.         2.0), you may hit the F10 key at any time to delete it.
  707.         This warning message will always prompt you to hit Alt-F10
  708.         to verify the delete action. GUARDSET completely wipes the
  709.         SENTRY program from the disk, so that no unerase utility
  710.         can restore it. Moreover, since you may use this option to
  711.         clean out old SENTRY modules no longer in use, GUARDSET
  712.         does not verify the status of any directories or files
  713.         involved; they could even be in an encrypted state. It's up
  714.         to you to make sure you are not deleting an active SENTRY!
  715.         
  716.         If you hit any key other than Alt-F10, the SENTRY model
  717.         will not be deleted.
  718.         
  719.         Until you create another SENTRY, the support mechanism
  720.         will retain the specifications for the deleted SENTRY, so
  721.         that you can later select the deleted SENTRY from the menu
  722.         and rebuild it, if necessary. When you create a new SENTRY,
  723.         the new specs will very likely overlay the 'deleted' specs,
  724.         making a rebuild impossible.
  725.  
  726.  
  727.     W50:    This warning message means that the SENTRY module will
  728.         itself be one of the files that will become inaccessible
  729.         upon running it in encrypt mode. Therefore, DOS will not be
  730.         able to load it to run it to decrypt! (Catch-22)  You can
  731.         go ahead and hit Alt-F7 to create this SENTRY module, but
  732.         be sure you also make another SENTRY that performs the same
  733.         actions and is outside the affected paths. The only
  734.         scenario I can think of where you actually want to do this
  735.         is when you want SENTRY to encrypt, say, all directories on
  736.         drive C, and you want SENTRY on drive C also, for
  737.         convenience. You would then create a 2nd SENTRY on a floppy
  738.         disk to use in decrypting.
  739.         
  740.         Normally, you'll want to avoid this altogether. Assign
  741.         SENTRY to a drive and directory that will not be affected
  742.         by its own encrypting action.
  743.  
  744.         If you hit any key other than Alt-F7, the SENTRY program
  745.         won't be written, and you can continue to edit the screen.
  746.         
  747.  
  748.     W60:    This warning message means that the SENTRY module already
  749.         exists. Hit Alt-F7 to go ahead and write over the existing
  750.         SENTRY program. When using GUARDSET to alter an existing
  751.         SENTRY, you will naturally always get this warning message.
  752.  
  753.         If you hit any key other than Alt-F7, the SENTRY program
  754.         won't be written, and you can continue to edit the screen.
  755.  
  756.                     - 14 -
  757.     W65:    This message is the result of GUARDSET's support mechanism
  758.         at work helping to prevent a security system conflict.
  759.  
  760.         Before creating or re-creating a SENTRY program, GUARDSET
  761.         looks at the specifications for all other SENTRYs created
  762.         so far. If it discovers a conflict in protection specs,
  763.         it displays this warning message in the form
  764.  
  765.             'Conflict with AAAAAAAAAAAA (XXX,YY,ZZ)'
  766.  
  767.         in which 'AAAAAAAAAAAA' is the name of the other SENTRY
  768.         involved in conflict, 'XXX' is the menu page number where
  769.         that SENTRY can be found, 'YY' is the line number on that
  770.         menu page, and 'ZZ' is the item number within that SENTRY
  771.         causing the conflict with the highlighted line on the
  772.         screen. You may go ahead and continue creating the current
  773.         SENTRY by hitting Alt-F7, or you may change the specs for
  774.         the current SENTRY so as to remove the conflict. If you
  775.         choose Alt-F7, I strongly recommend that you visit the
  776.         other SENTRY referred to in this warning, and either alter
  777.         its specifications, or delete it. Running two or more
  778.         SENTRY programs whose specifications are in conflict could
  779.         result in a data mess such as the one described in problem
  780.         #1, section 3.3 below.
  781.  
  782.  
  783.     E70:    This error message will be displayed if you try to tell
  784.         GUARDSET to modify a program other than one of its own
  785.         SENTRY children. (If you have a customized GUARDSET,
  786.         SENTRY modules you have created will produce this error in
  787.         any other GUARDSET that is invoked to alter or view them.)
  788.  
  789.     E71:    This error message means that the highlighted line contains
  790.         no directory or file path name, only a drive letter. If you
  791.         really want to encrypt everything in the root directory
  792.         itself, you must also enter 'R' in the line below the '?'
  793.         to confirm that you mean the root directory. (Message I11.)
  794.  
  795.     E72:    This error message means you specified 'R' for root
  796.         directory, yet you have named a file or directory beyond
  797.         the drive letter. If you really want to encrypt everything
  798.         in the root directory, delete everything in the name but
  799.         the drive letter.
  800.         
  801.     E73:    The highlighted path name was sought and not found. Check 
  802.         spelling, etc. Note also that if this path was left in an
  803.         encrypted state, you will get this message. SENTRY modules
  804.         should be altered or created only when the affected files
  805.         and directories are in the normal state.
  806.  
  807.     E74:    The two highlighted entries are giving SENTRY redundant
  808.         instructions. If, for example, you specify directory DIR1
  809.         and all its sub-directories and file names to be encrypted,
  810.         and in another line you name one of those sub-directories,
  811.         SENTRY is being asked to encrypt that sub-directory twice.
  812.         In this example, correct by either removing the reference
  813.         to sub-directories of DIR1, or removing the entire line
  814.         referring to the sub-directory in question.
  815.                     - 15 -
  816.         
  817.     E75:    The two highlighted entries have switch settings which
  818.         conflict with each other. If, for example, you specify
  819.         directory DIR1 and all its sub-directories and file names
  820.         to be encrypted, and in another line you specify the data
  821.         for a certain group of files in DIR1 to be encrypted, that
  822.         won't work. SENTRY is being asked to encrypt file names in
  823.         one instance, and data in another. Either remove the switch
  824.         to encrypt all files within DIR1, or remove the entire line
  825.         naming those specific files.
  826.         
  827.     E76:    Switch settings are such that SENTRY will perform
  828.         absolutely no action on the highlighted item. If you are in
  829.         doubt how to set the individual switches, use the security
  830.         level switch to set the other switches, referring to
  831.         sections 2.211, 2.212, and 2.213 above.
  832.         
  833.     E77:    The only time you will see this error message is if you
  834.         specify data encryption for files that will include the two
  835.         DOS boot files on a system disk (IBMBIO.COM and IBMDOS.COM,
  836.         or IO.SYS and MSDOS.SYS). A data encryption/decryption
  837.         cycle will restore every file exactly as it was, but they
  838.         may be in a different physical location on the disk. This
  839.         is not important EXCEPT when it comes to these boot files.
  840.         Either settle for file name encryption without data
  841.         encryption, or use wildcard characters to ensure that these
  842.         files are not included in any data encryption cycle.
  843.         
  844.     E80:    The SENTRY.COM file cannot be opened and written. This may
  845.         be a hardware problem (??)
  846.  
  847.     E81:    This error message is essentially the same as E70. You
  848.         cannot overwrite any program except for SENTRY programs
  849.         that you created with the same GUARDSET module.
  850.  
  851.     E82:    This error message means that the drive and directory to
  852.         contain the SENTRY module was sought and not found. Check
  853.         spelling, and (like message E73) check to see whether this
  854.         path might be in an encrypted state.
  855.  
  856.     E83:    The name you give to SENTRY must be a valid DOS file name,
  857.         from 1 to 8 characters.
  858.  
  859.     E84:    SENTRY's file extension must be .COM
  860.  
  861.     E89:    DOS 3.0 or later is required to run GUARDSET.
  862.  
  863.     E90:    This error message will be displayed if you have altered
  864.         GUARDSET so as to cripple it. 
  865.  
  866.     E91:    These messages refer to miscellaneous file I-O problems.
  867.    thru E99:    Like E80, the exact problem is unknown to GUARDSET; may
  868.         be hardware or other critical I-O problem.
  869.  
  870.                     - 16 -
  871.  
  872.     2.5  Four examples
  873.  
  874.     An example is worth a thousand explanations. Below are four screen
  875.     mockups representing four different SENTRY modules that GUARDSET
  876.     could create, and what the GUARDSET screen would look like in each
  877.     case. 
  878.  
  879.     In the first example we have a small business scenario where we
  880.     want to protect payroll data, and we choose to stick with the
  881.     default settings for the directory named 'PAYROLL'.
  882.  
  883.     We assign a password which the both you and your accountant will
  884.     know, in order to access the basic payroll data.
  885.     
  886.     With the GUARDSET program diskette in drive A, type the following:
  887.     
  888.         A:\GUARDSET [Enter]
  889.     
  890.     then edit the screen to look like this:
  891.  
  892.  
  893.  
  894.  
  895.          GuardSet v 2.0 (c) 1989, 1993 Jerry DePyper
  896.             * Your name or message here *
  897.  
  898.             F7=Create Program     ESC=Exit to DOS
  899.     Model:
  900.   Program:C:\SENTRY.COM
  901. ┌──────────────────────────────────────────────────────────────────────────────┐
  902. │        Default switch '?' (What is it ??) : Directory          Switches │
  903. │        Default switch '!' (Security level): 0                   ?!DSFAxx │
  904. │  1.C:\PAYROLL                                  D0X      │
  905. │  2.                                           │
  906. │  3.                                           │
  907. │  4.                                           │
  908. │  5.    This is just an example. Unless you have a directory 'C:\PAYROLL',     │
  909. │  6.    you can't create a SENTRY program exactly like this.               │
  910. │  7.                                           │
  911. │  8.                                           │
  912. │  9.                                           │
  913. │ 10.                                           │
  914. │ 11.                                           │
  915. └──────────────────────────────────────────────────────────────────────────────┘
  916.   Program file attribute: 0  Normal
  917.  `Last access' msg (Y/N): Y   Progress msgs (Y/N): Y   Password Req'd? (Y/N):  Y
  918.      Password: LETMEIN
  919. Attempts: 3    Keybd purge? N   Allow change? Y   Seize? N   Post-fail alarm?  Y
  920.  
  921.                     - 17 -
  922.  
  923.     In the next example, we use the first SENTRY created above to serve
  924.     as a model. 'PAYROLL' is included WITH THE SAME SWITCH SETTINGS as
  925.     the model program, plus the 'PERSONAL' directory is included, and
  926.     two tax files within it are given data encryption. This SENTRY2 is
  927.     placed in an out-of-the-way directory, is itself assigned a hidden,
  928.     read-only attribute, and is given a password that only you know. So
  929.     both you and your accountant can control the 'PAYROLL' directory,
  930.     but only you may access your personal stuff.
  931.  
  932.     You could create this SENTRY2 right away, without quitting the
  933.     first screen above, or bring up the first SENTRY from the GUARDSET
  934.     menu, or, with the GUARDSET program diskette in drive A:, you could
  935.     get the first SENTRY program directly by typing:
  936.     
  937.         A:\GUARDSET C:\SENTRY.COM [Enter]
  938.     
  939.     then edit the screen to look like this:
  940.  
  941.  
  942.  
  943.  
  944.          GuardSet v 2.0 (c) 1989, 1993 Jerry DePyper
  945.             * Your name or message here *
  946.  
  947.        F7=Create Program    F10=Delete Model    ESC=Exit to DOS
  948.     Model:C:\SENTRY.COM
  949.   Program:C:\SECURE\SENTRY2.COM
  950. ┌──────────────────────────────────────────────────────────────────────────────┐
  951. │        Default switch '?' (What is it ??) : Directory          Switches │
  952. │        Default switch '!' (Security level): 0                   ?!DSFAxx │
  953. │  1.C:\PAYROLL                                  D0X      │
  954. │  2.C:\PERSONAL                              D0X      │
  955. │  3.C:\PERSONAL\TAXINFO.*                           FA  DA   │
  956. │  4.                                           │
  957. │  5.                                           │
  958. │  6.    This is just an example. Unless you have directories 'C:\PAYROLL'      │
  959. │  7.    and 'C:\PERSONAL', you can't create a SENTRY program exactly like      │
  960. │  8.    this.                                       │
  961. │  9.                                           │
  962. │ 10.                                           │
  963. │ 11.                                           │
  964. └──────────────────────────────────────────────────────────────────────────────┘
  965.   Program file attribute: 3  Hidden Read-Only
  966.  `Last access' msg (Y/N): Y   Progress msgs (Y/N): Y   Password Req'd? (Y/N):  Y
  967.      Password: IMDBOSS
  968. Attempts: 3    Keybd purge? N   Allow change? Y   Seize? N   Post-fail alarm?  Y
  969.  
  970.                     - 18 -
  971.  
  972.     This third example demonstrates one way to put your whole hard disk
  973.     out of reach. The first entry encrypts all sub-directory names on
  974.     drive C, and the second entry hides and encrypts all files on the
  975.     root directory. (By using two entries in this way, the overhead of
  976.     handling all files on all sub-directories is avoided).
  977.  
  978.     Since this will result in a non-bootable hard disk, the SENTRY.COM
  979.     is placed on a floppy disk that also contains the DOS boot files.
  980.     This diskette, then, is used to boot the system and decrypt drive C.
  981.  
  982.     Needless to say, this is an extreme measure.
  983.     
  984.     
  985.     
  986.  
  987.  
  988.          GuardSet v 2.0 (c) 1989, 1993 Jerry DePyper
  989.             * Your name or message here *
  990.  
  991.             F7=Create Program     ESC=Exit to DOS
  992.     Model:
  993.   Program:A:\SENTRY.COM
  994. ┌──────────────────────────────────────────────────────────────────────────────┐
  995. │        Default switch '?' (What is it ??) : Directory          Switches │
  996. │        Default switch '!' (Security level): 0                   ?!DSFAxx │
  997. │  1.C:\                                  R5XX     │
  998. │  2.C:\*.*                                  F3  NA   │
  999. │  3.                                           │
  1000. │  4.                                           │
  1001. │  5.                                           │
  1002. │  6.                                           │
  1003. │  7.                                           │
  1004. │  8.                                           │
  1005. │  9.                                           │
  1006. │ 10.                                           │
  1007. │ 11.                                           │
  1008. └──────────────────────────────────────────────────────────────────────────────┘
  1009.   Program file attribute: 0  Normal
  1010.  `Last access' msg (Y/N): Y   Progress msgs (Y/N): Y   Password Req'd? (Y/N):  Y
  1011.      Password: WATCHIT
  1012. Attempts: 3    Keybd purge? N   Allow change? Y   Seize? N   Post-fail alarm?  Y
  1013.  
  1014.                     - 19 -
  1015.  
  1016.     In the final example, we have an indication of how flexible SENTRY
  1017.     can be. By not filling in any lines, and by specifying no password
  1018.     required, we create a simple little pseudo-log file. We can run this
  1019.     with the /o switch (see section 3.0 below) from our AUTOEXEC.BAT or
  1020.     any regular batch procedure, and it will display a message telling
  1021.     us the time and date that we last logged on or ran the batch job.
  1022.  
  1023.     In contrast with example #3, this innocuous little program is
  1024.     compatible with any other SENTRY you may create.
  1025.     
  1026.  
  1027.  
  1028.  
  1029.  
  1030.          GuardSet v 2.0 (c) 1989, 1993 Jerry DePyper
  1031.             * Your name or message here *
  1032.  
  1033.             F7=Create Program     ESC=Exit to DOS
  1034.     Model:
  1035.   Program:C:\LOG.COM
  1036. ┌──────────────────────────────────────────────────────────────────────────────┐
  1037. │        Default switch '?' (What is it ??) : Directory          Switches │
  1038. │        Default switch '!' (Security level): 0                   ?!DSFAxx │
  1039. │  1.                                           │
  1040. │  2.                                           │
  1041. │  3.                                           │
  1042. │  4.                                           │
  1043. │  5.                                           │
  1044. │  6.                                           │
  1045. │  7.                                           │
  1046. │  8.                                           │
  1047. │  9.                                           │
  1048. │ 10.                                           │
  1049. │ 11.                                           │
  1050. └──────────────────────────────────────────────────────────────────────────────┘
  1051.   Program file attribute: 0  Normal
  1052.  `Last access' msg (Y/N): Y   Progress msgs (Y/N): Y   Password Req'd? (Y/N):  N
  1053.  
  1054.  
  1055.                     - 20 -
  1056.     3.0  Running SENTRY
  1057.  
  1058.     Each SENTRY module that you create runs in two modes, determined by
  1059.     a command line switch. SENTRY /L (Lock) encrypts the files and/or
  1060.     directories under its charge. SENTRY /O (Open) first asks for a
  1061.     password, then decrypts the same files and/or directories.
  1062.  
  1063.     Invoke SENTRY thus:
  1064.  
  1065.     SENTRY /L  To encrypt (Lock) the specified files and/or directories
  1066.     SENTRY /O  To decrypt (Open)    "    "    "    "    "
  1067.  
  1068.     If SENTRY is in a sub-directory    that is not on the DOS search path,
  1069.     you will also have to include the full path on the command line.
  1070.     e.g. '\SECURE\SENTRY /O'
  1071.  
  1072.  
  1073.     3.1 Entering and changing the password
  1074.  
  1075.     The password logic in SENTRY is a little unorthodox in that all
  1076.     keystrokes entered are accepted as possible password characters -
  1077.     even cursor movement keys, backspace, etc. This means that you will
  1078.     not be able to erase or edit out of a mistyped password...just hit
  1079.     the carriage return key and try again. And when you set a new
  1080.     password as described below, you can likewise use cursor movement
  1081.     keys, embedded spaces, and function keys as part of the password.
  1082.     Alphabetic characters in the password are not case-sensitive. That
  1083.     is, it doesn't matter whether you key the lower case or upper case
  1084.     form of the letters of the alphabet.
  1085.  
  1086.     Unless you set the password option or the change-password option
  1087.     off (see section 2.4, messages I22 and I26), you can change
  1088.     SENTRY's password on the fly whenever SENTRY is run to decrypt. At
  1089.     the password prompt, key in the correct password as usual, but,
  1090.     instead of following the password with a carriage return (Enter
  1091.     key), hit the spacebar once. Then key in the new password (1 - 8
  1092.     keystrokes), and follow it with the carriage return key. If you did
  1093.     that correctly, SENTRY will then prompt you to verify the new
  1094.     password by typing it in again (without the old one this time).
  1095.     This ensures that your new password is really what you want it to
  1096.     be. If you correctly verify the new password, SENTRY accepts it.
  1097.     From now on, this new password will be required. Otherwise, the old
  1098.     password is retained.
  1099.  
  1100.  
  1101.     3.11   Gotcha! (Catching a would-be snooper)
  1102.  
  1103.     If someone tries to run SENTRY /O to gain access to areas you have
  1104.     encrypted with SENTRY /L, he will be unable to get past the
  1105.     password requirement. Then, upon your next successful access, the
  1106.     number of failed attempts will be displayed, with the time and date
  1107.     and passwords attempted. Be sure to record this information (e.g.
  1108.     print the screen), as SENTRY will not save it.
  1109.  
  1110.     Even if someone learns your password and gains access, you may be
  1111.     able to catch the intruder by paying close attention to the time
  1112.     and date of the last access, which is displayed at every access
  1113.     (unless this option was set off - see section 2.4, message I20).
  1114.                     - 21 -
  1115.  
  1116.     3.2  Using batch files
  1117.  
  1118.     I suggest using batch files to automate the use of SENTRY. For an
  1119.     example of what to set up, I have included two batch files on the
  1120.     product diskette, LOCK.BAT and UNLOCK.BAT. These are intended as
  1121.     examples only...you should set up your own batch files tailored to
  1122.     the name you gave to your SENTRY program, etc. You could also
  1123.     incorporate SENTRY into your present batch files or procedures. For
  1124.     example, you might set SENTRY up to encrypt the '123' directory
  1125.     where you keep all your Lotus 1-2-3 files and programs. The
  1126.     following '123.BAT' file would then automatically invoke SENTRY to
  1127.     prompt for a password and, if correct, open the 123 directory.
  1128.     After you have quit from 1-2-3, the batch file would invoke SENTRY
  1129.     again, this time to close the 123 directory behind itself:
  1130.  
  1131.         echo off
  1132.         rem 123.BAT (example batch file for using SENTRY)
  1133.         sentry /o
  1134.         if errorlevel 254 goto reject
  1135.         if errorlevel 4 goto openerr
  1136.         if not errorlevel 2 goto open_ok
  1137.         echo 123 directory was left open !
  1138.         :open_ok
  1139.         cd\123
  1140.         123
  1141.         cd\
  1142.         sentry /l
  1143.         if not errorlevel 3 goto end
  1144.         echo Cannot close 123 directory
  1145.         goto end
  1146.         :openerr
  1147.         echo Cannot open 123 directory
  1148.         goto end
  1149.         :reject
  1150.         rem An unauthorized access attempt!
  1151.         rem Take whatever action you deem necessary here
  1152.         :end
  1153.  
  1154.     As this example illustrates, using a batch file lets you take
  1155.     advantage of the error values returned to DOS by SENTRY. These are
  1156.     the possible errorlevel values:
  1157.  
  1158.     0  Successful
  1159.     1  Lock option chosen; nothing found to encrypt    (already locked)
  1160.     2  Open option chosen; nothing found to decrypt    (already open)
  1161.     3  Lock option; cannot encrypt - directory not found, or file error
  1162.     4  Open option; cannot decrypt - directory not found, or file error
  1163.     5  Command line error. Must specify /O(pen) or /L(ock)
  1164.     6  Invalid DOS version. Must be DOS 3.0 or later
  1165.     7  Illegal program copy. (SENTRY was copied or renamed outside
  1166.         of GUARDSET)
  1167.       254  Open option - correct password not entered (request rejected)
  1168.       255  Open option - Ctrl-C or Ctrl-Brk hit at password prompt (reject)
  1169.  
  1170.     Sensing a rejected access attempt (errorlevel 254 or 255) opens up
  1171.     many possibilities. You may passively return to DOS as in the above
  1172.     example, delete certain key files, or whatever you want to do.
  1173.                     - 22 -
  1174.  
  1175.     3.3  Trouble-shooting SENTRY
  1176.  
  1177.     PROBLEM #1: Files or directories left encrypted by 'SENTRY /O'
  1178.     
  1179.     This may happen if you create two (or more) SENTRY programs that
  1180.     each address the same directory, file, or group of files. This is
  1181.     perfectly workable as long as the switch settings for the common
  1182.     items are compatible in each SENTRY. In big letters: WHEN TWO OR
  1183.     MORE SENTRY PROGRAMS WILL ENCRYPT THE SAME ITEMS, THE SWITCH
  1184.     SETTINGS SHOULD BE IDENTICAL IN EACH CASE. To ensure that this is
  1185.     the case, use one SENTRY as a model to create the second. (As an
  1186.     illustration of this, see section 2.5, examples 1 and 2.)
  1187.     
  1188.     This problem, then, comes when the above rule has been violated.
  1189.     For example, SENTRY1 may have encrypted a certain directory and
  1190.     all files within it, then SENTRY2 decrypted only the directory
  1191.     (because file encryption was not specified for SENTRY2). The
  1192.     result is a decrypted directory containing encrypted files, and
  1193.     even if you now run SENTRY1 /O at this point to decrypt the files,
  1194.       it fails to take any action on this item.
  1195.     
  1196.     So, what to do? Run the less comprehensive program (SENTRY2 in this
  1197.     example) with the /L switch to encrypt the directory name, then run
  1198.     SENTRY1 /O to decrypt both the directory and its files. That is,
  1199.     you 'back out' of the situation by running the reverse mode of each
  1200.     SENTRY in reverse order. Then use GUARDSET to change either SENTRY1
  1201.     or SENTRY2 so that this doesn't happen again.
  1202.     
  1203.         NOTE: A very special case of this sort involves data
  1204.         encryption. For example, SENTRY1 encrypts a file name and
  1205.         data, then SENTRY2 decrypts only the file name, thus
  1206.          resulting in a decrypted file name containing encrypted
  1207.         data. If at this point you run 'SENTRY1 /L' to encrypt
  1208.         again, it will find the decrypted file name and go ahead
  1209.         with the name and data encryption. This will result in
  1210.         'double-encrypted' data (which is NOT the same as decrypted
  1211.         data), and things could get a little messy. The 'back out'
  1212.         procedure still applies here to correct the situation, but
  1213.         it is much better to avoid this problem altogether by
  1214.         setting the switches identically for items common to two
  1215.         or more SENTRY programs.
  1216.         
  1217.     Best solution: Heed warning message W65!
  1218.  
  1219.  
  1220.     PROBLEM #2: SENTRY always returns errorlevel value 1 or 2
  1221.  
  1222.      Errorlevel values 1 and 2 will be returned whenever SENTRY fails to
  1223.     encrypt / decrypt anything. This is usually because you are trying
  1224.     to encrypt what is already encrypted, or to decrypt what is already
  1225.     decrypted, as noted in section 3.1 above. It is possible, however, 
  1226.     to create a SENTRY that, say, only sets file attributes, and never
  1227.     does any actual encryption. This SENTRY will always return these
  1228.     two error codes. Or, you may have deleted all files or removed all
  1229.     directories that SENTRY was looking for, so it found nothing to
  1230.     encrypt. In either case, you should modify SENTRY, or at least
  1231.     modify the batch file to treat these two error values as OK.
  1232.                     - 23 -
  1233.  
  1234.     PROBLEM #3: Screen message 'Error 5', 'Error 6', or 'Error 7'
  1235.  
  1236.      'Error 5' - Command line error. You must specify /O(pen) or /L(ock)
  1237.     'Error 6' - Invalid DOS version. Must be DOS 3.0 or later
  1238.     'Error 7' - Invalid program copy. If you copy, move, or rename the
  1239.             SENTRY program without using GUARDSET to do so, SENTRY
  1240.             will refuse to function. See note in section 1.4.
  1241.  
  1242.     Of course, you already noticed from section 3.2 above that error-
  1243.     levels 5, 6, and 7 are returned to DOS in these three cases.
  1244.     
  1245.  
  1246.     
  1247.     PROBLEM #4: Processing takes a long time
  1248.     
  1249.     This is usually not a problem unless you have specified data
  1250.     encryption for a number of large files. You may want to re-evaluate
  1251.     the security level considerations, and choose data encryption only
  1252.     for a few select files.
  1253.  
  1254.     In any case, processing speed may be improved by increasing the
  1255.     'BUFFERS=' parameter in your CONFIG.SYS file. Try BUFFERS=20, or a
  1256.     higher value. For more information on the CONFIG.SYS file, see your
  1257.     DOS manual. It may also help to periodically reorganize your disk
  1258.     with a disk defragmenter utility.
  1259.  
  1260.     Since almost all the work done by SENTRY involves disk I-O, using
  1261.     an accelerator board or running in turbo mode to speed up the
  1262.     processor will be of little value here.
  1263.     
  1264.  
  1265.     
  1266.     PROBLEM #5: Incompatibility
  1267.     
  1268.     GUARDSET and SENTRY are designed to be compatible with MS-DOS/
  1269.     PC-DOS on an IBM or IBM-compatible machine. Compatibility is not
  1270.     guaranteed with non-DOS systems, nor with any particular disk-cache
  1271.     or disk management software. If you think this may be a problem,
  1272.     please experiment with a test file or directory first, before using
  1273.     GUARDSET/SENTRY in earnest. STACKER, for example, is one utility
  1274.     that I know of at this writing that is incompatible with GUARDSET.
  1275.  
  1276.  
  1277.     
  1278.     PROBLEM #6: 'Last Access' date & time are wrong
  1279.     
  1280.     Aha! Somebody knows your password, and has accessed SENTRY since you
  1281.     did last! Better change your password pronto.
  1282.  
  1283.     Another possiblity: the system date & time were wrong when you last
  1284.     ran 'SENTRY /O' to decrypt. If this is the case, you may just need
  1285.     a new clock or CMOS battery. Also, on some XT systems, make sure you
  1286.     have called 'ASTCLOCK', 'AUTOTIME', or other clock utility before
  1287.     running SENTRY. Please note that in these cases the date & time
  1288.     recorded for any failed access attempt will likewise be meaningless.
  1289.                     - 24 -
  1290.  
  1291.     Appendix A: File attributes and their hex values
  1292.  
  1293.     DOS uses a one-byte field in the directory entry of each disk file
  1294.     to define the attributes for that file. Disregarding directories
  1295.     and labels as special cases, four bits in this byte are used:
  1296.  
  1297.         The low-order bit (value = 1) is the read-only bit. When it
  1298.         is turned on, DOS and some programs will refuse to update
  1299.         the file's data. Since many utilities and programs
  1300.         circumvent this measure, it is of limited value in
  1301.         protecting data.
  1302.  
  1303.         Next is the hidden (value = 2) bit, which prevents a DOS
  1304.         DIR command from displaying the file, and which will
  1305.         prevent DOS from copying or deleting the file. Again, this
  1306.         is relatively easy to circumvent with many utilities.
  1307.  
  1308.         The DOS file bit (value = 4) is generally used only by DOS
  1309.         for its own system files. In addition to hiding the file
  1310.         like the previous attribute, DOS will refuse to execute any
  1311.         program that carries this attribute. (That's why GUARDSET
  1312.         will not let you assign this attribute to a SENTRY program)
  1313.  
  1314.         The archive bit (value = hex 20 or decimal 32), is usually
  1315.         turned on whenever a file is created or updated. The DOS
  1316.         BACKUP program and many other backup utilities will set
  1317.         this bit off when backing up the file, and may not back it
  1318.         up again until it has been set on again (i.e, the file has
  1319.         been changed).
  1320.  
  1321.     
  1322.     Two or more of these attributes may be combined to define a single
  1323.     file. In a couple places, the GUARDSET screen uses the resultant
  1324.     hex value to refer to a file's attributes, as follows:
  1325.  
  1326.         Hex    Attribute description
  1327.  
  1328.          0    Normal (no attributes set)
  1329.          1    Read-Only
  1330.          2    Hidden
  1331.          3    Hidden Read-Only
  1332.          4    DOS
  1333.          5    DOS Read-Only
  1334.          6    DOS Hidden
  1335.          7    DOS Hidden Read-Only
  1336.         20    Archive Normal (most common)
  1337.         21    Archive Read-Only
  1338.         22    Archive Hidden
  1339.         23    Archive Hidden Read-Only
  1340.         24    Archive DOS
  1341.         25    Archive DOS Read-Only
  1342.         26    Archive DOS Hidden
  1343.         27    Archive DOS Hidden Read-Only
  1344.         
  1345.                     - 25 -
  1346.  
  1347.     Appendix B: Design history and background
  1348.  
  1349.     Throughout this program development process, I kept two principles
  1350.     in mind: 1) Compatibility with DOS and a logic flow that will not
  1351.     allow any data to be lost, even in the event of a power failure
  1352.     during processing, and 2) Real security, which means that the
  1353.     original non-encrypted file or directory names and file data are
  1354.     not discernible, that the encrypted names cannot be entered from a
  1355.     keyboard, and that the encryption sequence is not discernible. For
  1356.     efficiency, the encryption module is written in assembler, and for
  1357.     compatibility, it uses only DOS interrupts to do its file and data
  1358.     manipulation.
  1359.  
  1360.     It began when I was looking for a way to automatically hide and
  1361.     encrypt directory names on a hard disk as a means of making
  1362.     sensitive data harder to reach. As mentioned above, this is usually
  1363.     enough in most situations to keep would-be snoopers at bay.
  1364.  
  1365.     But, since there are many utilities that will display a hidden
  1366.     directory for you and place you within it without typing its name
  1367.     from the keyboard, I decided it would be a nice option to be able
  1368.     to encrypt file names as well, and manipulate a file's attributes
  1369.     in the same automatic way. Now, not only casual snoopers but more
  1370.     serious and knowledgeable ones are thwarted in their efforts.
  1371.  
  1372.     As a logical extension to this line of reasoning, I then added data
  1373.     encryption as well, to make snooping next to impossible. This added
  1374.     a new dimension to the original encryption program: Directory and
  1375.     file names and file attribute can be changed with minor adjustments
  1376.     to the directories DOS uses for all its file handling, while data
  1377.     encryption was a different animal. To continue to maintain my two
  1378.     guiding principles, data encryption took this form:
  1379.  
  1380.         1. A second file is created.
  1381.         2. The original file's data is copied to this file in
  1382.            encrypted form.
  1383.         3. The second file is given an encrypted name corresponding
  1384.            to the original file's name.
  1385.         4. The original file's data is physically overwritten (so
  1386.            no trace of the sensitive data remains on the disk).
  1387.         5. The original file name is changed, and it is deleted.
  1388.  
  1389.     This is the only way to hide the original data from even the most
  1390.     tenacious intruder while ensuring that it will not be lost in the
  1391.     event of a power failure, etc. And while the program uses an
  1392.     efficient, tight code to achieve this, the disk I-O for a number
  1393.     of large files can be quite extensive. Safety vs speed...I'll take
  1394.     safety any day; how about you?
  1395.  
  1396.     So, there it was; a complete encryption program (SENTRY) that was
  1397.     still under 5K in size (4K without data encryption)! All that was
  1398.     left was to enclose this little program inside a 'mother' program
  1399.     and allow you to tailor it to your own needs. The result, of
  1400.     course, is the GUARDSET program, written in Microsoft C. I alone
  1401.     retain possession of yet a third program, which I use to customize
  1402.     GUARDSET for each registered user, so that no GUARDSET/SENTRY user
  1403.     poses a security threat to another.
  1404.